package personal.xjl._23java1studentdemo.spring;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

@Data
public class MyMath {
    @Value("10")
    int n1;
    @Value("20")
    int n2;
    int result;
    public void add(){
        result=n1+n2;
        System.out.println(result);
    }
    public void sub(){
        result=n1-n2;
        System.out.println(result);
    }
    public void mul(){
        result=n1*n2;
        System.out.println(result);
    }
    public void dev(){
        result=n1/n2;
        System.out.println(result);
    }
}
